package com.tmc.constant;

public class FareConstant {
	
	// 票证状态
	public static String TICKET_STATUS_NORMAL = "TICKET_STATUS_NORMAL";// 正常票
	public static String TICKET_STATUS_REFUND = "TICKET_STATUS_REFUND";// 退票
	public static String TICKET_STATUS_INVALID = "TICKET_STATUS_INVALID";// 废票

	public enum PolicyStatus {

		DISABLED("DISABLED", "无效"),
		DRAFT("DRAFT", "草稿"),
		REVIEWING("REVIEWING", "审核中"),
		UP("UP", "已发布"),
		DOWN("DOWN", "已挂起");

		private String status;
		private String statusName;
		
		PolicyStatus (String status, String statusName){
			this.status = status;
			this.statusName = statusName;
		}

		public String getStatus() {
			return status;
		}

		public void setStatus(String status) {
			this.status = status;
		}

		public String getStatusName() {
			return statusName;
		}

		public void setStatusName(String statusName) {
			this.statusName = statusName;
		}

	}
	
	public static String getStatusName(String status){
		for (PolicyStatus value : PolicyStatus.values()){
			if (value.getStatus().equals(status)){
				return value.getStatusName();
			}
		}
		return "";
	}
	
	public enum Platform {

		ziying("ziying", "自营"),
		taobao("taobao", "淘宝"),
		ctrip("ctrip", "携程"),
		qunaer("qunaer", "去哪儿");

		private String code;
		private String name;
		
		Platform (String code, String name){
			this.code = code;
			this.name = name;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

	}
	
	public static String getPlatformName(String code){
		for (Platform value : Platform.values()){
			if (value.getCode().equals(code)){
				return value.getName();
			}
		}
		return "";
	}
}
